
package std.argopt
import std.collection.*


@Deprecated[message: "Use global function `public func parseArguments(args: Array<String>, specs: Array<ArgumentSpec>): ParsedArguments` instead."]
@!APILevel[
    since: "22"
]
public class ArgOpt {
    @!APILevel[
        since: "22"
    ]
    public init(shortArgFormat: String)
    
    @!APILevel[
        since: "22"
    ]
    public init(longArgList: Array<String>)
    
    @!APILevel[
        since: "22"
    ]
    public init(shortArgFormat: String, longArgList: Array<String>)
    
    @!APILevel[
        since: "22"
    ]
    public init(args: Array<String>, shortArgFormat: String, longArgList: Array<String>)
    
    @!APILevel[
        since: "22"
    ]
    public func getArg(arg: String): Option<String>
    
    @!APILevel[
        since: "22"
    ]
    public func getUnparseArgs(): Array<String>
    
    @!APILevel[
        since: "22"
    ]
    public func getArgumentsMap(): HashMap<String, String>
}

@!APILevel[
    since: "22"
]
public enum ArgumentMode <: ToString & Equatable<ArgumentMode> {
    @!APILevel[
        since: "22"
    ]
    NoValue |
    @!APILevel[
        since: "22"
    ]
    RequiredValue |
    @!APILevel[
        since: "22"
    ]
    OptionalValue
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
    
    @!APILevel[
        since: "22"
    ]
    public operator func ==(that: ArgumentMode): Bool
}

@!APILevel[
    since: "22"
]
public enum ArgumentSpec {
    @!APILevel[
        since: "22"
    ]
    Short(Rune, ArgumentMode) |
    @!APILevel[
        since: "22"
    ]
    Short(Rune, ArgumentMode, (String) -> Unit) |
    @!APILevel[
        since: "22"
    ]
    Long(String, ArgumentMode) |
    @!APILevel[
        since: "22"
    ]
    Long(String, ArgumentMode, (String) -> Unit) |
    @!APILevel[
        since: "22"
    ]
    Full(String, Rune, ArgumentMode) |
    @!APILevel[
        since: "22"
    ]
    Full(String, Rune, ArgumentMode, (String) -> Unit) |
    @!APILevel[
        since: "22"
    ]
    NonOptions((Array<String>) -> Unit)
}

@!APILevel[
    since: "22"
]
public struct ParsedArguments {
    @!APILevel[
        since: "22"
    ]
    public prop options: ReadOnlyMap<String, String>
    
    @!APILevel[
        since: "22"
    ]
    public prop nonOptions: Array<String>
}

@!APILevel[
    since: "22"
]
public class ArgumentParseException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public func parseArguments(args: Array<String>, specs: Array<ArgumentSpec>): ParsedArguments

